package d0312;

public class AnonymousInnerClass {
    private String name = "Jerry";
    private int age = 24;
   /* House house = new House() {
        @Override
        public void show() {

        }
    };*/
  /* IFoo foo = new IFoo() {
       @Override
       public void display() {
           System.out.println("hello");

       }
   };*/
 //IFoo foo = (String s) -> System.out.println(s);

   // public static void main(String[] args) {
    //    AnonymousInnerClass al=new AnonymousInnerClass();
    //    al.foo.showStr("world");
  //  };
  IFoo foo = () -> System.out.println("hello");
    public static void main(String[] args) {
        AnonymousInnerClass al = new AnonymousInnerClass();
        al.foo.display();
    }
}

interface  IFoo{
    public void display();
}
abstract class House{
    public abstract  void show();
}

    /*IFoo foo =new IFoo(){
        @Override
        public void display(){
            System.out.println(name+"\t"+age);
        }
    };

    public static void main(String[] args) {
        AnonymousInnerClass al =new AnonymousInnerClass();
        al.foo.display();
    }
}

interface IFoo{
    public void display();
*/